<h1>Bill of Lading Document</h1>
<fieldset>
<legend> Information </legend>
<?php if($billoflading){
    $tempsession = $tempsession = $this->session->userdata('user');
    foreach($billoflading['billoflading'] as $rows){
        $location_file = $rows->LocationFile;
        $idbilloflading = $rows->idBillOfLading;
?>
<table>
    <tr>
        <td>Sender</td>
        <td><label><?php echo $rows->cname;?></label></td>
        <td>Replier</td>
        <td><label><?php echo $rows->slname;?></label></td>
    </tr>
    <tr>
        <td>Sent Date</td>
        <td><label><?php echo $rows->SentDate;?></label></td>
        <td>Replied Date</td>
        <td><label><?php echo $rows->RepplyDate;?></label></td>
    </tr>
    <tr>
        <td>Sent Status</td>
        <td><label><?php echo $rows->SentStatus;?></label></td>
        <td>Replied Status</td>
        <td><label><?php echo $rows->RepplyStatus;?></label></td>
    </tr>
    <tr>
        <td>Sent Message</td>
        <td><label><?php echo $rows->SentNote;?></label></td>
        <td>Replied Message</td>
        <td><label><?php echo $rows->RepplyNote;?></label></td>
    </tr>
</table>
</fieldset>
<br/>
<fieldset>
<legend> Content </legend>
<table>
    <tr>
        <td><label>Creation Date</label></td>
        <td><label><?php echo $rows->CreationDate;?></label></td>
        <td>No Bill of Lading</td>
        <td><label><?php echo $rows->BLNumber;?></label></td>
    </tr>
    <tr>
        <td>Shipper</td>
        <td><label><?php echo $rows->SLName;?></label></td>
        <td>Consignee</td>
        <td><label><?php echo $rows->CName;?></label></td>
    </tr>
    <tr>
        <td></td>
        <td><label><?php echo $rows->SLAddress;?></label></td>
        <td></td>
        <td><label><?php echo $rows->CAddress;?></label></td>
    </tr>
    <tr>
        <td></td>
        <td><label><?php echo $rows->SLTelp;?></label></td>
        <td></td>
        <td><label><?php echo $rows->CTelp;?></label></td>
    </tr>
    <tr>
        <td>Notify Party</td>
        <td><label><?php echo $rows->NPName;?></label></td>
        <td>Forwarder</td>
        <td><label><?php echo $rows->FName;?></label></td>
    </tr>
    <tr>
        <td></td>
        <td><label><?php echo $rows->NPAddress;?></label></td>
        <td></td>
        <td><label><?php echo $rows->FAddress;?></label></td>
    </tr>
    <tr>
        <td></td>
        <td><label><?php echo $rows->NPTelp;?></label></td>
        <td></td>
        <td><label><?php echo $rows->FTelp;?></label></td>
    </tr>
    <tr>
        <td>Precarriage</td>
        <td><label><?php echo $rows->Precarriage;?></label></td>
        <td>Place of Receipt</td>
        <td><label><?php echo $rows->PlaceOfReceipt;?></label></td>
    </tr>
    <tr>
        <td>Vessel</td>
        <td><label><?php echo $rows->Vessel;?></label></td>
        <td>Port of Loading</td>
        <td><label><?php echo $rows->PortOfLoading;?></label></td>
    </tr>
    <tr>
        <td>Port of Discharge</td>
        <td><label><?php echo $rows->PortOfDischarge;?></label></td>
        <td>Place of Delivery</td>
        <td><label><?php echo $rows->PlaceOfDelivery;?></label></td>
    </tr>
    <tr>
        <td>Delivery Agent</td>
        <td><label><?php echo $rows->DAName;?></label></td>
        <td>Freight Charges</td>
        <td><label><?php echo $rows->FreightCharges;?></label></td>
    </tr>
    <tr>
        <td></td>
        <td><label><?php echo $rows->DAAddress;?></label></td>
        <td>Revenue Tons</td>
        <td><label><?php echo $rows->RevenueTons;?></label></td>
    </tr>
    <tr>
        <td></td>
        <td><label><?php echo $rows->DATelp;?></label></td>
        <td>Prepaid</td>
        <td><label><?php echo $rows->Prepaid;?></label></td>
    </tr>
    <tr>
        <td>Collect</td>
        <td><label><?php echo $rows->Collect;?></label></td>
        <td>Exchange Rate</td>
        <td><label><?php echo $rows->ExchangeRate;?></label></td>
    </tr>
    <tr>
        <td>PrepaidAt</td>
        <td><label><?php echo $rows->PrepaidAt;?></label></td>
        <td>PayableAt</td>
        <td><label><?php echo $rows->PayableAt;?></label></td>
    </tr>
    <tr>
        <td>Place Of Issue</td>
        <td><label><?php echo $rows->PlaceOfIssue;?></label></td>
        <td>Date Of Issue</td>
        <td><label><?php echo $rows->DateOfIssue;?></label></td>
    </tr>
    <tr>
        <td>No Of Original Bill</td>
        <td><label><?php echo $rows->NoOfOriginalBill;?></label></td>
        <td></td>
        <td></td>
    </tr>
</table>
<br/>
<?php 
    }
?>
    <fieldset>
        <legend>Line Item</legend>
        <table>
            <tr>
                <td>Container No</td>
                <td>Seal No</td>
                <td>Package</td>
                <td>Description</td>
                <td>Weight</td>
                <td>Measurement</td>
            </tr>
            <?php foreach($billoflading['lineitem'] as $rows){ ?>
            <tr>
                <td><?php echo $rows->ContainerNo;?></td>
                <td><?php echo $rows->SealNo;?></td>
                <td><?php echo $rows->Package;?></td>
                <td><?php echo $rows->Description;?></td>
                <td><?php echo $rows->Weight;?></td>
                <td><?php echo $rows->Measurement;?></td>
            </tr>
            <?php }?>
        </table>
    </fieldset>
    <br/>
    <label><a href="<?php echo base_url();?>consignee/downloaddocument/BL/<?php echo $idbilloflading;?>" target="_blank" >Download Document</a></label>
</fieldset>
<br/>
<?php
    }
?>